import java.util.Scanner;

public class TestDemo {
    public static void main(String[] args) {
        int keyWord = 123;
        int count = 3;
        Scanner scanner = new Scanner(System.in);
        while(count!=0){
            int num = scanner.nextInt();
            if(keyWord==num) {
                System.out.println("登陆成功");
                return;
            }else{
                System.out.println("密码错误");
                count--;
            }
        }
        System.out.println("三次输入错误，程序退出");
    }
}
